From f12219735e7cdf5959f0293b4ae7088a3aeec4bb Mon Sep 17 00:00:00 2001 From: Travis Betak Date: Mon, 5 Mar 2007 16:18:10 -0600 Subject: [PATCH] [SVM] Return the shadow EFER value on guest EFER reads. Return the shadow of the guest's EFER instead of the VMCB. This helps with things such as the unlikely event the guest wants to check EFER.LME immediately after setting it (The VMCB's EFER.LME remains clear until the guest enables paging). Signed-off-by: Travis Betak --- xen/arch/x86/hvm/svm/svm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index f0baf1c1cd..01064e21e3 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -187,8 +187,7 @@ static inline int long_mode_do_msr_read(struct cpu_user_regs *regs) switch ((u32)regs->ecx) { case MSR_EFER: - msr_content = vmcb->efer; - msr_content &= ~EFER_SVME; + msr_content = v->arch.hvm_svm.cpu_shadow_efer; break; #ifdef __x86_64__ -- 2.30.2